<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
* {
	margin: 0px;
	padding: 0px;
}

video {
	transform: rotateY(180deg);
	width: 100%;
	height: 100%;
}

#ios-video::-webkit-media-controls {
	display: none !important;
}
</style>
</head>
<body>
	<div style="position: absolute;width: 100%; height: 100%">
		<video id="video" autoplay="autoplay"></video>
		<video id="ios-video" controls playsinline="true"></video>
	</div>
</body>
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
<script src="/static/js/stomp.js" type="text/javascript"></script>
<script src="/static/js/websocket.js" type="text/javascript"></script>
<script src="/static/js/show.js" type="text/javascript"></script>
<script type="text/javascript">
function init(w){
	if(checkPlatform != "ios"){
		document.getElementById('ios-video').remove();
	}else{
		document.getElementById('video').remove();
	}
	var userId = getParameter("id",window);
	var type = getParameter("type",window);
	show("/topic/userId-"+userId,$("#video")[0],type);
}

//获取地址栏参数
function getParameter(name,win){
    var params;
    if(null==win||undefined==win){
        params = window.location.search;
    }else{
        params = win.location.search;
    }
    params = params.substring(1, params.length);
    params = params.split("&");
    for (var i =0; i < params.length; i++){
        var items = params[i].split("=");
        var pname = items[0];
        if(pname == name){
            return items[1];
        }
    }
}
function checkPlatform(){
	if(/android/i.test(navigator.userAgent)){
		return "android";//Android
	}
	if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){
		return "ios";//iOS
	}
}
</script>
</html>